﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Student:Person
    {
        private string major;
        private int grade;

        public string Major
        {
            get { return this.major; }
            set { this.major = value; }
        }
        public int Grade
        {
            get { return this.grade; }
            set { this.grade = value; }
        }
        public Student(string name, int id, string sex, string cardid, string tel,string major,int grade) : base(name,id,sex,cardid,tel)
        {
            this.Major = major;
            this.Grade = grade;
        }
        public void GetStudent()
        {
            base.GetData();
            Console.WriteLine("我的专业是{0},我的年级是：{1}", this.Major, this.Grade);
        }
    }
}
